﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:Controls;assembly=Controls">

    <Style x:Key="FocusVisual">
    	<Setter Property="Control.Template">
    		<Setter.Value>
    			<ControlTemplate>
    				<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>

    <ControlTemplate x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}">
        <Border
    Name="Border" 
    CornerRadius="{DynamicResource CornerRadiusSize}"
    Background="Transparent"
    BorderBrush="{DynamicResource LightGraySteviaBrush}"
    BorderThickness="0">
            <TextBlock VerticalAlignment="Center" Margin="0,0,0,0" HorizontalAlignment="Center" Text="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" Foreground="White" />
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="ToggleButton.IsMouseOver" Value="true">
                <Setter TargetName="Border" Property="Background"
              Value="{DynamicResource ColorThemeUltraLightBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
                <Setter TargetName="Border" Property="Background"
              Value="{DynamicResource ColorThemeUltraLightOpacity50Brush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Border" Property="Background"
              Value="{DynamicResource LightGraySteviaBrush}" />
                <Setter TargetName="Border" Property="BorderBrush"
              Value="{DynamicResource LightGraySteviaBrush}" />
                <Setter Property="Foreground"
              Value="{DynamicResource LightGraySteviaBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    
    <Style x:Key="BaseExpander" TargetType="{x:Type Expander}">
        <Setter Property="Background" Value="#FF40aae6" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Expander">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Name="ContentRow" Height="0"/>
                        </Grid.RowDefinitions>
                        <Border Name="Border" Grid.Row="0" Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}">
                            <Grid Height="30">
                                <ToggleButton Content="{Binding Path=Header, RelativeSource={RelativeSource TemplatedParent}}" IsChecked="{Binding Path=IsExpanded,Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ExpanderToggleButton}" OverridesDefaultStyle="True" Foreground="White" Background="Transparent" />
                            </Grid>
                        </Border>
                        <Border Name="Content" Grid.Row="1" Background="White">
                            <ContentPresenter />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="True">
                            <Setter TargetName="ContentRow" Property="Height" Value="180" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="Background"
                    Value="{DynamicResource LightGraySteviaBrush}" />
                            <Setter TargetName="Border" Property="BorderBrush"
                    Value="{DynamicResource LightGraySteviaBrush}" />
                            <Setter Property="Foreground"
                    Value="{DynamicResource LightGraySteviaBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!-- Titre des modules -->
    <Style x:Key="TitleModule" TargetType="TextBlock">
        <Setter Property="FontSize" Value="16.67" />
        <Setter Property="FontWeight" Value="Light" />
        <Setter Property="Foreground" Value="{DynamicResource BrushTitleModule}" />
    </Style>

    <Style x:Key="HeaderZoneMetro" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="{DynamicResource ColorThemeBrush}" />
        <Setter Property="FontFamily" Value="Segoe UI Light" />
        <Setter Property="FontSize" Value="20pt" />
    </Style>

    <Style x:Key="PerformanceProgressBar" TargetType="{x:Type ProgressBar}">
        <Setter Property="Foreground" Value="{DynamicResource ColorThemeBrush}"/>
        <Setter Property="Background" Value="#FFCCCCCC"/>
        <Setter Property="Maximum" Value="100"/>
        <Setter Property="IsHitTestVisible" Value="False"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <controls:RelativeAnimatingContentControl HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                        <controls:RelativeAnimatingContentControl.Resources>
                            <ExponentialEase EasingMode="EaseOut" Exponent="1" x:Key="ProgressBarEaseOut"/>
                            <ExponentialEase EasingMode="EaseIn" Exponent="1" x:Key="ProgressBarEaseIn"/>
                        </controls:RelativeAnimatingContentControl.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Determinate"/>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard RepeatBehavior="Forever" Duration="00:00:04.4">
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="IndeterminateRoot">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DeterminateRoot">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.0" Storyboard.TargetProperty="X" Storyboard.TargetName="R1TT">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
                                            <LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="66.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetProperty="X" Storyboard.TargetName="R2TT">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
                                            <LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="62.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Storyboard.TargetProperty="X" Storyboard.TargetName="R3TT">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
                                            <LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="58.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Storyboard.TargetProperty="X" Storyboard.TargetName="R4TT">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
                                            <LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="54.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.8" Storyboard.TargetProperty="X" Storyboard.TargetName="R5TT">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
                                            <LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="50.1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R1">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R2">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R3">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R4">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.8" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R5">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Grid x:Name="DeterminateRoot" Margin="{TemplateBinding Padding}" Visibility="Visible">
                                <Rectangle x:Name="ProgressBarTrack" Fill="{TemplateBinding Background}" Height="5" Opacity="0.1"/>
                                <Rectangle x:Name="ProgressBarIndicator" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Left" Height="5"/>
                            </Grid>
                            <Border x:Name="IndeterminateRoot" Margin="{TemplateBinding Padding}" Visibility="Collapsed">
                                <Grid HorizontalAlignment="Left">
                                    <Rectangle Fill="{TemplateBinding Foreground}" Height="5" IsHitTestVisible="False" Width="5" x:Name="R1" Opacity="0" CacheMode="BitmapCache">
                                        <Rectangle.RenderTransform>
                                            <TranslateTransform x:Name="R1TT"/>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Rectangle Fill="{TemplateBinding Foreground}" Height="5" IsHitTestVisible="False" Width="5" x:Name="R2" Opacity="0" CacheMode="BitmapCache">
                                        <Rectangle.RenderTransform>
                                            <TranslateTransform x:Name="R2TT"/>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Rectangle Fill="{TemplateBinding Foreground}" Height="5" IsHitTestVisible="False" Width="5" x:Name="R3" Opacity="0" CacheMode="BitmapCache">
                                        <Rectangle.RenderTransform>
                                            <TranslateTransform x:Name="R3TT"/>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Rectangle Fill="{TemplateBinding Foreground}" Height="5" IsHitTestVisible="False" Width="5" x:Name="R4" Opacity="0" CacheMode="BitmapCache">
                                        <Rectangle.RenderTransform>
                                            <TranslateTransform x:Name="R4TT"/>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Rectangle Fill="{TemplateBinding Foreground}" Height="5" IsHitTestVisible="False" Width="5" x:Name="R5" Opacity="0" CacheMode="BitmapCache">
                                        <Rectangle.RenderTransform>
                                            <TranslateTransform x:Name="R5TT"/>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                </Grid>
                            </Border>
                        </Grid>
                    </controls:RelativeAnimatingContentControl>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!-- Ressources pour les icones de notification -->
    <Viewbox Width="32.000" Height="32.000" x:Key="InformationNotificationMessageIcon">
        <Canvas Width="32.000" Height="32.000">
            <Canvas>
                <Path Fill="#ff4B7BAF" Data="F1 M 16.666,5.333 C 15.562,5.333 14.667,6.229 14.667,7.333 C 14.667,8.438 15.562,9.333 16.666,9.333 C 17.771,9.333 18.666,8.438 18.666,7.333 C 18.666,6.229 17.771,5.333 16.666,5.333 Z M 12.000,12.000 L 12.000,14.667 L 14.667,14.667 L 14.667,24.000 L 12.000,24.000 L 12.000,26.666 L 21.334,26.666 L 21.334,24.000 L 18.666,24.000 L 18.666,14.667 L 18.666,12.000 L 12.000,12.000 Z M 16.000,0.000 C 24.837,0.000 32.000,7.164 32.000,16.000 C 32.000,24.836 24.837,32.000 16.000,32.000 C 7.163,32.000 0.000,24.836 0.000,16.000 C 0.000,7.164 7.163,0.000 16.000,0.000 Z"/>
            </Canvas>
        </Canvas>
    </Viewbox>

    <Viewbox Width="32.000" Height="32.000" x:Key="ExclamationNotificationMessageIcon">
        <Canvas Width="32.000" Height="32.000">
            <Canvas>
                <Path Fill="#ffe7be4a" Data="F1 M 16.000,21.334 C 14.527,21.334 13.333,22.527 13.333,24.000 C 13.333,25.473 14.527,26.666 16.000,26.666 C 17.473,26.666 18.666,25.473 18.666,24.000 C 18.666,22.527 17.473,21.334 16.000,21.334 Z M 12.667,5.667 L 14.333,19.334 L 17.666,19.334 L 19.334,5.667 L 12.667,5.667 Z M 16.000,0.000 C 24.837,0.000 32.000,7.164 32.000,16.000 C 32.000,24.836 24.837,32.000 16.000,32.000 C 7.163,32.000 0.000,24.836 0.000,16.000 C 0.000,7.164 7.163,0.000 16.000,0.000 Z"/>
            </Canvas>
        </Canvas>
    </Viewbox>

    <Viewbox Width="32.000" Height="29.830" x:Key="ErrorNotificationMessageIcon">
        <Canvas Width="32.000" Height="29.830">
            <Canvas>
                <Path Fill="#ffb42323" Data="F1 M 16.000,21.760 C 14.727,21.760 13.694,22.792 13.694,24.065 C 13.694,25.339 14.727,26.371 16.000,26.371 C 17.273,26.371 18.306,25.339 18.306,24.065 C 18.306,22.792 17.273,21.760 16.000,21.760 Z M 13.118,8.213 L 14.559,20.031 L 17.440,20.031 L 18.883,8.213 L 13.118,8.213 Z M 30.987,29.830 L 1.013,29.830 C -0.338,28.480 -0.338,26.290 1.013,24.939 L 13.962,1.013 C 15.313,-0.338 17.502,-0.338 18.853,1.013 L 30.987,24.939 C 32.337,26.290 32.337,28.480 30.987,29.830 Z"/>
            </Canvas>
        </Canvas>
    </Viewbox>

    <Viewbox Width="32.001" Height="29.830" x:Key="QuestionNotificationMessageIcon">
        <Canvas Width="32.001" Height="32.000">
            <Canvas>
                <Path Fill="#ff4a7aae" Data="F1 M 20.050,15.595 C 18.431,16.404 17.620,17.492 17.620,18.834 L 17.620,20.454 L 13.571,20.454 L 13.571,19.239 C 13.571,16.485 16.000,14.786 16.812,13.976 C 18.431,12.356 18.431,12.131 18.431,11.547 C 18.431,10.204 17.343,9.116 16.000,9.116 C 14.658,9.116 13.571,10.204 13.571,11.547 L 13.571,12.761 L 9.521,12.761 L 9.521,11.950 C 9.521,8.597 12.422,5.877 16.000,5.877 C 19.579,5.877 22.479,8.191 22.479,11.547 C 22.479,12.761 21.671,14.786 20.050,15.595 Z M 15.596,26.123 C 14.477,26.123 13.571,25.217 13.571,24.099 C 13.571,22.980 14.477,22.075 15.596,22.075 C 16.714,22.075 17.620,22.980 17.620,24.099 C 17.620,25.217 16.714,26.123 15.596,26.123 Z M 16.001,0.000 C 7.165,0.000 0.000,7.164 0.000,16.000 C 0.000,24.837 7.165,32.000 16.001,32.000 C 24.839,32.000 32.001,24.837 32.001,16.000 C 32.001,7.164 24.839,0.000 16.001,0.000 Z"/>

            </Canvas>
        </Canvas>
    </Viewbox>
</ResourceDictionary>